package com.tencent.wxcloudrun.vo.response.user;

import com.tencent.wxcloudrun.domain.TUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Objects;

/**
 * @Author ZhaoZiYin
 * @Date 2025/4/22
 * @Description 用户查询请求出参
 */
@Data
@ApiModel(value = "UserQueryResVo", description = "用户查询请求出参")
public class UserQueryResVo {

    @ApiModelProperty("用户ID")
    private Long userId;

    @ApiModelProperty("微信用户唯一标识")
    private String wxOpenId;

    @ApiModelProperty("用户状态 1-正常 2-冻结")
    private Integer status;

    @ApiModelProperty("用户名称")
    private String name;

    @ApiModelProperty("用户类型 1-玩家 2-管理员 ")
    private Integer type;

    @ApiModelProperty("用户头像")
    private String avatar;

    @ApiModelProperty("手机号")
    private String phone;

    public void build(TUser user) {
        this.setUserId(user.getId());
        this.setWxOpenId(user.getWxOpenId());
        this.setStatus(user.getStatus());
        this.setName(user.getName());
        this.setType(user.getType());
        this.setAvatar(user.getAvatar());
        this.setPhone(user.getPhone());
    }

}
